#pragma  once

class CGlobal
{
public:
	static CString GetFirstParam(CString &strName);
	static CRect StringToRect(CString& strData);
	static void DrawBitmap(CDC* dc, HBITMAP hbmp, RECT r, BOOL Stretch);
	static void DrawBitmap(CDC* dc, IPicture* pIpic, RECT r);
	static HRGN GenerateRegion(HBITMAP hBitmap, BYTE red = 255, BYTE green = 0, BYTE blue = 255);
	static BYTE* Get24BitPixels(HBITMAP pBitmap, WORD *pwWidth, WORD *pwHeight);
	static HRGN BitmapToRegion1 (HBITMAP hBmp, long cxleft, long cytop, long cx, long cy, 
		COLORREF cTransparentColor, COLORREF cTolerance );
	static void CopyBitmap(CDC* dc, CBitmap& mRes, const CBitmap& hbmp, RECT r);
};